package com.team.order.domain.enums;

/**
 * 支付状态枚举
 * @author 梁国瑞
 */
public enum PayStatusEnum {
    UNPAID(0, "未支付"),
    PAID(1, "已支付"),
    REFUNDED(2, "已退款");
    
    private final Integer code;
    private final String label;
    
    PayStatusEnum(Integer code, String label) {
        this.code = code;
        this.label = label;
    }
    
    public Integer getCode() {
        return code;
    }
    
    public String getLabel() {
        return label;
    }
    
    public static PayStatusEnum getByCode(Integer code) {
        for (PayStatusEnum status : values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null;
    }
} 